import { createApp } from 'vue'
import App from './App'
import router from './router'
import store from './store'

import 'assets/less/base.less'
import 'assets/font/iconfont.css'

import SocketService from './utils/socket'
// 对服务端进行websocket的连接
SocketService.Instance.connect()

const app = createApp(App)

// 其他的组件  this.$socket
app.config.globalProperties.$socket = SocketService.Instance

// vue3.0取消了Vue.prototype，官方文档推荐使用globalProperties
// 将全局echarts对象挂载到vue的原型对象上
app.config.globalProperties.$echarts = window.echarts

app.use(store).use(router).mount('#app')
